package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;

public class ReactorDoOnExample {
    public static void main(String[] args) {
        Flux<Integer> source = Flux.range(1, 5);

        source
                .doOnNext(value -> System.out.println("Processing element: " + value))
                .doOnComplete(() -> System.out.println("Processing complete"))
                .subscribe(System.out::println);
    }
}
